<?php

class Kd_Html_Grid_Head_Label extends Kd_Html_Grid_Head_Base {

    public function __construct(){
        parent::__construct();
        $this->templateName = 'grid/head/label';
    }

    protected function render(){
        $result = '';
        if($this->getColumn()->getSortField()){
            $result .= '<a href="'.$this->getSortUrl().'">';
        }
        $result .= '<span>'.$this->getColumn()->getTitle().'</span>';
        if($this->getColumn()->getSortField()){
            $result .= '</a>';
        }
        return $result;
    }
}